package yunjiao.javatutorials.designpatterns.interpreter;

import lombok.extern.slf4j.Slf4j;

/**
 * 入口
 *
 * @author yangyunjiao
 */
@Slf4j
public class App {
    public static void main(String[] args) {
        Expression e = new Division(
                new Multiplication(new Number(4), new Number(5)),
                new Addition(new Number(3), new Number(1))
        );

        double result = e.interpret();
        log.info(" (4 * 5) / (3 + 1) Result: {}", result);
    }
}
